<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../style.css" rel="stylesheet" type="text/css">
    <title>PETSc: Developers Site</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1>Developers Site</h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../index.html">Home</a></li>
        <li><a href="../download/index.html">Download</a></li>
        <li><a href="../features/index.html">Features</a></li>
        <li><a href="../documentation/index.html">Documentation</a></li>
        <li><a href="../publications/index.html">Applications/Publications</a></li>
        <li><a href="../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../miscellaneous/external.html">External Software</a></li>
        <li>
          <span class="current">Developers Site</span>
          <ul>
            <li><span class="current">Getting started</span></li>
            <li><a href="../documentation/changes/dev.html">Changes</a></li>
            <li><a href="http://www.mcs.anl.gov/petsc/petsc-master/docs/index.html">Development copy of documentation</a></li>
            <li><a href="developers.pdf">Developers Instructions</a></li>
            <li><a href="https://bitbucket.org/petsc/petsc/issues?status=new&status=open">Proposed projects</a></li>
          </ul>
        </li>
      </ul>
    </div>

    <div id="main">

      <p>
        These pages are for people interested in using the development copy of
        PETSc or contributing to the PETSc libraries. This
        information is intended only for people who are experienced with
        building, using, and debugging PETSc. If you cannot use makefiles,
        a debugger, and EMACS etags, then please don't access these pages.
      </p>

      Consider joining the PETSc developers <a href="../miscellaneous/mailing-lists.html">mailing-list</a>.

      <p>How to:</p>

      <ul>
        <li><a href="#browsing">browse sources in the repository</a></li>
        <li><a href="#obtaining">obtain the development version of PETSc</a></li>
        <li><a href="#compiling_and_using_the_development_copy">compile the developement version</a></li>
        <li><a href="#building_documentation:">build documentation for the development version</a></li>
        <li><a href="#sending_patches_to_update_the_">submitting code for inclusion in PETSc</a></li>
        <li><a href="#nightly_logs">check nightlybuild logs</a></li>
        <li><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/pc/impls/jacobi/jacobi.c.html">add a new PC type</a></li>
        <li><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/cg/cg.c.html">add a new KSP type</a></li>
        <li><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/seq/superlu/superlu.c.html">add a new subclass of a matrix type (implementation inheritence)</a></li>
      </ul>

      <h2><a name="browsing">Browsing source:</a></h2>

      One can browse the development repositories at the following location

      <ul>
        <li><a href="https://bitbucket.org/petsc/petsc">https://bitbucket.org/petsc/petsc</a></li>
      </ul>

      <h2><a name="obtaining">Obtaining the development version of PETSc:</a></h2>


      <a href="http://git-scm.com/downloads">Install Git</a> if it is not already installed on your machine, then obtain PETSc with the following:

      <ul>
        <li><code>git clone https://bitbucket.org/petsc/petsc</code></li>
        <li><code>cd petsc</code></li>
      </ul>

      PETSc can now be configured in the usual way, specified on the
      <a href="../documentation/installation.html">Installation page</a>.

      To update your copy of petsc
      <ul>
        <li><code>git pull</code></li>
      </ul>

      Once updated, you will usually want to rebuild completely

      <ul>
        <li><code>./$PETSC_ARCH/lib/petsc/conf/reconfigure-$PETSC_ARCH.py</code></li>
        <li><code>make</code></li>
      </ul>

      For additional help use
      <ul>
        <li>git help [or]</li>
        <li>man git</li>
        <li><a href="https://bitbucket.org/petsc/petsc/wiki/Home">[developer instructions at our wiki]</a></li>
        <li><a href="http://git-scm.com/book/en/">[Pro Git book]</a></li>
      </ul>

      If you absolutely cannot use git then you can <a href="#master-tarball">access tarballs directly from 'master' branch.</a> or <a href="#nightly-tarball">access the nightly tarball snapshot</a> 



      <h2><a name="building_documentation:">Building documentation:</a></h2>

      <p>
        The documentation tools listed below (except for pdflatex) are
        automatically downloaded and installed by ./configure.
      </p>

      <ul>
        <li>
          <a href="http://ftp.mcs.anl.gov/pub/sowing/sowing.tar.gz">Sowing</a>:
          a text processing tool developed by Bill Gropp. This produces the PETSc manual pages see <a href="http://www.cs.uiuc.edu/homes/wgropp/projects/software/sowing/doctext.pdf">sowing documentation</a></li>

        <li>
          <a href="http://ftp.mcs.anl.gov/pub/petsc/c2html.tar.gz">C2html</a>:
          A text processing package. This generates the HTML versions of all the source code.
        </li>

        <li>
          A version of pdflatex <a href="http://www.tug.org/texlive/">(for example in TeX Live)</a>:
          This package might already be installed on most systems. It is required to generate
          the users manual (part of the PETSc documentation).
        </li>
      </ul>

        <b>Note</b>: sowing and c2html have additional dependencies like gcc, g++, and flex and do not
        use compilers specified to PETSc configure. [Windows users please install the corresponding
        cygwin packages]

      <p>Once pdflatex (e.g., from <a href="http://tug.org/texlive">TeX Live</a>) is in your PATH, you can build the documentation with:</p>

      <ul>
        <li><code>make alldoc LOC=${PETSC_DIR}</code></li>
      </ul>

      <h2><a name="sending_patches_to_update_the_">Submitting code for inclusion in PETSc:</a></h2>

       See <a href="https://bitbucket.org/petsc/petsc/wiki/Home">https://bitbucket.org/petsc/petsc/wiki/Home</a> for how to contribute code to PETSc.
     

      <p>
        Please read the code standards chapter of the
        <a href="http://www.mcs.anl.gov/petsc/developers/developers.pdf">developer guide</a>
        before submitting code.
      </p>

      <p>
        Once you have gained experience with developing PETSc source code, you
        can become an active member of our development and push changes directly
        to the petsc repository. Send mail to petsc-maint@mcs.anl.gov to
        arrange it.
      </p>

      <h2>Developer guide:</h2>

      The <a href="http://www.mcs.anl.gov/petsc/developers/developers.pdf">developer guide</a>
      gives an overview of the design and detailed style specifications.

      <h2><a name="nightly_logs">Nightly builds:</a></h2>

      <p>
        The logs for the nightly builds at
        <li>
          <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/index.html">http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/index.html</a>
        </li>
      </p>

      <h2>Other ways to obtain PETSc:</h2>
        <a name="master-tarball"><h3>Getting a Tarball of the git master branch of PETSc</h3></a> Use the following URL:
      </p>

      <ul>
        <li>
          <a href="https://bitbucket.org/petsc/petsc/get/master.tar.gz">https://bitbucket.org/petsc/petsc/get/master.tar.gz</a>
        </li>
      </ul>

      <p>
        This mode is useful if you are on a machine where you cannot install
        Git or if it has a firewall blocking http downloads.
      </p>

      After the tarballs is obtained - do the following:
      <ul>
        <li><code>tar zxf petsc-petsc-CHANGESET.tar.gz</code></li>
        <li><code>mv petsc-petsc-CHANGESET petsc</code></li>
      </ul>

      <p>
        To update this copy of petsc, re-download the above tarball.
        The URL above gets the latest changes immediately when they are pushed to the repository.
      </p>

      <p>
        <a name="nightly-tarball"><h3>Getting the Nightly tarball of the git master branch of PETSc</h3></a> The nightly tarball will be equivalent to the release
        tarball - with all the documentation built. Use the following URL:

       <ul>
        <li>       <a href="http://ftp.mcs.anl.gov/pub/petsc/petsc-master.tar.gz">http://ftp.mcs.anl.gov/pub/petsc/petsc-master.tar.gz</a>
       </li>
      </ul>

      To update your copy of petsc simply get a new copy of the tar file.
      The tar file at the ftp site is updated once each night [arround midnight
      Chicago time] with the latest changes to the development version of PETSc.

    </div>

    <hr>

  </body>
</html>
